package b.sync.sample

import b.sync.domain.{Extractor, MySQL, QuillHelper}
import cats.effect
import eu.timepit.refined.auto._
import shapeless._ // For macros

object TPckExtractor extends Extractor[TPckRow] with QuillHelper {

  import quillCtx._

  override val stmtQuery = quillCtx.run(quote(querySchema[TPckRow]("xp_t_pck"))).string
  override val ds = MySQL("test", "root", "root")

  override def extract(from: Long): effect.IO[List[(TPckRow, Int, Int)]] =
    macroExtract[TPckRow]
}
